package com.trkj.pojo;

import java.io.Serializable;
import javax.persistence.*;

import com.alibaba.fastjson.annotation.JSONField;

import java.sql.Timestamp;
import java.util.List;


/**
 * The persistent class for the CHARACTERISTIC_ITEM database table.
 * 
 */
@Entity
@Table(name="CHARACTERISTIC_ITEM")
@NamedQuery(name="CharacteristicItem.findAll", query="SELECT c FROM CharacteristicItem c")
public class CharacteristicItem implements Serializable {
	private static final long serialVersionUID = 1L;

	@Id
	@SequenceGenerator(name="CHARACTERISTIC_ITEM_CHARAID_GENERATOR", sequenceName="HR")
	@GeneratedValue(strategy=GenerationType.SEQUENCE, generator="CHARACTERISTIC_ITEM_CHARAID_GENERATOR")
	@Column(name="CHARA_ID")
	private long charaId;

	@Column(name="CHARA_CREATORDATE")
	private Timestamp charaCreatordate;

	@Column(name="CHARA_NAME")
	private String charaName;

	@Column(name="CHARA_PERSON")
	private String charaPerson;

	@Column(name="CHARA_UPDATEDATE")
	private Timestamp charaUpdatedate;

	//bi-directional many-to-one association to StaffInformation
	@OneToMany(mappedBy="characteristicItem")
	@JSONField(serialize=false)
	private List<StaffInformation> staffInformations;

	public CharacteristicItem() {
	}

	public long getCharaId() {
		return this.charaId;
	}

	public void setCharaId(long charaId) {
		this.charaId = charaId;
	}

	public Timestamp getCharaCreatordate() {
		return this.charaCreatordate;
	}

	public void setCharaCreatordate(Timestamp charaCreatordate) {
		this.charaCreatordate = charaCreatordate;
	}

	public String getCharaName() {
		return this.charaName;
	}

	public void setCharaName(String charaName) {
		this.charaName = charaName;
	}

	public String getCharaPerson() {
		return this.charaPerson;
	}

	public void setCharaPerson(String charaPerson) {
		this.charaPerson = charaPerson;
	}

	public Timestamp getCharaUpdatedate() {
		return this.charaUpdatedate;
	}

	public void setCharaUpdatedate(Timestamp charaUpdatedate) {
		this.charaUpdatedate = charaUpdatedate;
	}

	public List<StaffInformation> getStaffInformations() {
		return this.staffInformations;
	}

	public void setStaffInformations(List<StaffInformation> staffInformations) {
		this.staffInformations = staffInformations;
	}

	public StaffInformation addStaffInformation(StaffInformation staffInformation) {
		getStaffInformations().add(staffInformation);
		staffInformation.setCharacteristicItem(this);

		return staffInformation;
	}

	public StaffInformation removeStaffInformation(StaffInformation staffInformation) {
		getStaffInformations().remove(staffInformation);
		staffInformation.setCharacteristicItem(null);

		return staffInformation;
	}

}